<html>
<head>
	<meta charset="UTF-8">
	<meta content="IE=edge" http-equiv="X-UA-Compatible">
	<meta content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no, width=device-width" name="viewport">
	<title>4476：[Jsoi2015]送礼物</title>
	<!-- css -->
	<link href="../css/base.min.css" rel="stylesheet">
	<link href="../css/project.min.css" rel="stylesheet">
	
	<!-- favicon -->
	<!-- ... -->
</head>
<body class="page-brand">
	<header class="header header-transparent header-waterfall ui-header">
		<ul class="nav nav-list pull-left">
			<li>
				<a data-toggle="menu" href="#menu">
					<span class="icon icon-lg">menu</span>
				</a>
			</li>
		</ul>
		<a class="header-logo header-affix-hide margin-left-no margin-right-no" data-offset-top="213" data-spy="affix">[Jsoi2015]送礼物</a>
		<span class="header-logo header-affix margin-left-no margin-right-no" data-offset-top="213" data-spy="affix">[Jsoi2015]送礼物</span>
	</header>
	<nav aria-hidden="true" class="menu" id="menu" tabindex="-1">
		<div class="menu-scroll">
			<div class="menu-content">
				<a class="menu-logo" href="../index.html">BZOJ离线题库</a>
				<ul class="nav">
					<li>
						<a class="waves-attach" data-toggle="collapse" href="#problems">题目</a>
						<ul class="menu-collapse collapse in" id="problems">
							<li>
								<a class="waves-attach" href="../index.html">主页</a>
							</li>
							<li>
								<a class="waves-attach" href="../list.html">题目列表</a>
							</li>
						</ul>
					</li>
					<li>
						<a class="collapsed waves-attach" data-toggle="collapse" href="#about">关于</a>
						<ul class="menu-collapse collapse" id="about">
							<li>
								<a class="waves-attach" href="../about.html">关于此项目</a>
							</li>
						</ul>
					</li>
					
				</ul>
			</div>
		</div>
	</nav>
	<main class="content">
		<div class="content-header ui-content-header">
			<div class="container">
				<h1 class="content-heading">
                [Jsoi2015]送礼物                </h1>
                <p>时间限制：30s&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  空间限制：512MB</p>			</div>
		</div>
		<div class="container">
			<section class="content-inner margin-top-no">
				<div class="row">
					<div class="col-lg-13 col-md-13">
						<div class="card margin-bottom-no">
							<div class="card-main">
								<div class="card-inner">
									
                                <h3>题目描述</h3><p><p>JYY和CX的结婚纪念日即将到来，JYY来到萌萌开的礼品店选购纪念礼物。<br />
萌萌的礼品店很神奇，所有出售的礼物都按照特定的顺序都排成一列，而且相邻<br />
的礼物之间有一种神秘的美感。于是，JYY决定从中挑选连续的一些礼物，但究<br />
竟选哪些呢？<br />
【问题描述】<br />
假设礼品店一共有N件礼物排成一列，每件礼物都有它的美观度。排在第i<br />
1&lt; =i&lt; =N个位置的礼物美观度为正整数Ai,。JYY决定选出其中连续的一段，<br />
即编号为礼物i,i+1,&hellip;,j-1,j的礼物。选出这些礼物的美观程度定义为<br />
(M（i,j)-m(i,j))/(j-i+k)<br />
其中M(i,j)表示max{Ai,Ai+1....Aj}，m(i,j)表示min{Ai,Ai+1....Aj}，K为给定的正整数。<br />
由于不能显得太小气，所以JYY所选礼物的件数最少为L件；同时，选得太<br />
多也不好拿，因此礼物最多选R件。JYY应该如何选择，才能得到最大的美观程<br />
度？由于礼物实在太多挑花眼，JYY打算把这个问题交给会编程的你。</p></p><hr/><h3>输入格式</h3><p><p>本题每个测试点有多组数据。输入第一行包含一个正整数T(T&lt; =10)，表示<br />
有T组数据。<br />
每组数据包含两行，第一行四个非负整数N,K,L,R(2&lt; =L&lt; =R&lt; =N。第二行<br />
包含N个正整数，依次表示A1,A2....An,(Ai&lt; =10^8),N,K&lt; = 50,000</p></p><hr/><h3>输出格式</h3><p><p>输出T行，每行一个非负实数，依次对应每组数据的答案，数据保证答案不<br />
会超过10^3。输出四舍五入保留4位小数。</p></p><hr/><h3>样例输入</h3><pre>1
5 1 2 4
1 2 3 4 5</pre><hr/><h3>样例输出</h3><pre>0.7500 </pre><hr/><h3>提示</h3><p>没有写明提示</p><hr/><h3>题目来源</h3><p>By 佚名上传</p>
								</div>
							</div>
						</div>
					</div>
				</div>
				
				
			</section>
		</div>
	</main>

	<div class="fbtn-container">
		<div class="fbtn-inner">
			<a class="fbtn fbtn-lg fbtn-brand-accent waves-attach waves-circle waves-light waves-effect" data-toggle="dropdown" aria-expanded="true"><span class="fbtn-text fbtn-text-left">Menu</span><span class="fbtn-ori icon">apps</span><span class="fbtn-sub icon">close</span></a>
			<div class="fbtn-dropup">
				<a class="fbtn fbtn-brand waves-attach waves-circle waves-light waves-effect" href="../list.html" target="_self"><span class="fbtn-text fbtn-text-left">题目列表</span><span class="icon">menu</span></a>
				<a class="fbtn fbtn-green waves-attach waves-circle waves-effect" href="../index.html" target="_self"><span class="fbtn-text fbtn-text-left">返回主页</span><span class="icon">home</span></a>
				<a class="fbtn waves-attach waves-circle waves-effect" href="http://www.lydsy.com/JudgeOnline/submitpage.php?id=4476" target="_blank"><span class="fbtn-text fbtn-text-left">提交代码</span><span class="icon">send</span></a>
				<a class="fbtn fbtn-orange waves-attach waves-circle waves-effect" href="http://www.lydsy.com/JudgeOnline/wttl/wttl.php?pid=4476" target="_blank"><span class="fbtn-text fbtn-text-left">试题讨论</span><span class="icon">chat</span></a>
				
			</div>
		</div>
	</div>

	<!-- js -->
	<script src="../js/jquery.min.js"></script>
	<script src="../js/base.min.js"></script>
	<script src="../js/project.min.js"></script>
</body>
</html>